package leetcode.interview;

public class Test0101 {
    public boolean isUnique(String astr) {
        long high64=0;
        long low64=0;
        for(char c:astr.toCharArray()){
            if(c-64>=0){
                long index=1L<<(c-64);
                if((index & high64) !=0)
                    return false;
                high64=high64|index;
            }
            else if(c-64<0){
                long index=1l<<c;
                if((index & low64) !=0)
                    return false;
                low64=low64|index;
            }
        }
        return true;
    }
}
